package model;

/**
 * Dice cup with two dices. Roll dices. Get the dice face values and compare for equals.
 * @author Group 20
 *
 */
public class DiceCup 
{
	private Dice dice1 = new Dice(); // Two dices in the dice cup
	private Dice dice2 = new Dice();
			
	/**
	 * Sums the face values of the dices 
	 * @return Sum of the two dices
	 */
	public int getSum() // Return summed face values
	{	
		return dice1.getFaceValue() + dice2.getFaceValue();
	}
	
	/**
	 * Roll both dices
	 */
	public void rollDices() // Roll dices
	{
		dice1.roll();
		dice2.roll();
	}
	
	/**
	 * Determines of the dice face values are equal
	 * @return
	 */
	public boolean getEns() // Check for equal values
	{
		return (dice1.getFaceValue() == dice2.getFaceValue());
	}
	
	/**
	 * Get dice 1 face value
	 * @return Dice 1 value
	 */
	public int Dice1Value() // Return the face value of dice 1
	{
		return dice1.getFaceValue();
	}
	
	/**
	 * Get dice 2 face value
	 * @return Dice 2 face value
	 */
	public int Dice2Value() // Return the face value of dice 2
	{
		return dice2.getFaceValue();
	}
	
	@Override
	public String toString() {
		return "MatadorRafleBaeger [dice1=" + dice1 + ", dice2=" + dice2 + "]";
	}
}

